<!DOCTYPE html>
<!--suppress ALL -->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>atob</title>
</head>
<body>
<h4>
    Decodes a string of data which has been encoded using base-64 encoding.
    Create a Buffer for the given string with base-64 encoding and use Buffer.
    toString('binary') to return the decoded string.
</h4>
<h4>
    解码使用base-64编码进行编码的一串数据。
    使用base-64编码为给定字符串创建一个缓冲区，并使用Buffer.toString（'binary'）返回解码后的字符串。
</h4>
<script type="text/javascript">
//    const atob = str => new Buffer(str, 'base64').toString('binary');
//    atob('Zm9vYmFy'); // 'foobar'
     const atob = str =>new ArrayBuffer(str,"base64").toString("binary");
     console.log(atob("Zm9vYmFy"));
</script>
</body>
</html>